const promise1 = new Promise((resolve, reject) => {
  setTimeout(() => {
    resolve();
  }, 1000);
});

const promise2 = promise1.catch(() => {
  return 2;
});

console.log(promise1, promise2);

setTimeout(() => {
  console.log(promise1, promise2);
}, 2000);
